<template>
  <div>
<button @click="state.count++">{{ state.count }}</button>
  </div>
</template>

<script setup>
import { reactive, watch } from 'vue'

const state=reactive({count:1,age:18})
watch(state,(newV,oldV)=>{
  console.log(newV,oldV)
})
</script>

<style lang="scss" scoped>

</style>